<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/vue"></script>
</head>
<body>
<div id="example">
    <button id="home">Home</button>
    <button id="posts">Posts</button>
    <button id="archive">Archive</button>
    <br>
    <component :is="currentView"></component>
</div>
<script>
    var vue=new Vue({
        el:'#example',
        data:{
            currentView:'home'
        },
        components:{
            home:{template:'Home'},
            posts:{template:'Posts'},
            archive:{template:'Archive'}
        }
    });
    document.getElementById('home').onclick=function(){
        vue.currentView='home';
    };
    document.getElementById('posts').onclick=function(){
        vue.currentView='posts';
    };
    document.getElementById('archive').onclick=function(){
        vue.currentView='archive';
    };
</script>
</body>
</html>